#ifndef VOLUMETOOL_H
#define VOLUMETOOL_H

#include <QWidget>

namespace Ui {
class VolumeTool;
}

class VolumeTool : public QWidget
{
    Q_OBJECT

public:
    explicit VolumeTool(QWidget *parent = nullptr);
    ~VolumeTool();

    void paintEvent(QPaintEvent *event);

    void onSilenceBtnClicked();

     bool eventFilter(QObject *watched, QEvent *event);

    void calcVolume();

signals:
    void setMusicMuted(bool isMuted);

    void setPlayerVolume(int volume);

private:
    Ui::VolumeTool *ui;

    bool isMuted;       //是否静音

    int volume;         //音量大小
};

#endif // VOLUMETOOL_H
